<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<LINK REL="stylesheet" HREF="../../../style.css">
 <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.50">
 <TITLE>DOMjudge Administrator's Manual: Submitdaemon and the Dolstra protocol </TITLE>
 <LINK HREF="admin-manual-9.html" REL=previous>
 <LINK HREF="admin-manual.html#toc10" REL=contents>
</HEAD>
<BODY>
Next
<A HREF="admin-manual-9.html">Previous</A>
<A HREF="admin-manual.html#toc10">Contents</A>
<HR>
<H2><A NAME="dolstra"></A> <A NAME="s10">10.</A> <A HREF="admin-manual.html#toc10">Submitdaemon and the Dolstra protocol </A></H2>


<P>In the default situation, teams can submit their solutions either
via browsing to the web interface, or by using the command line
submit client, which behind the scenes employs the same web
interface to actually make the submission. This setup suffices for
many environments.</P>
<P>The Dolstra protocol is different in that it uses a submitdaemon
running on the domserver. One advantage is that submissions can be
made before the IP address of the team is known.
This authentication is fortified by
the following process. When a client connects, it does not send the
submission file, but only a reference to a randomised and not publicly
visible file. This file is then copied from server side with the
submit_copy script. This makes it impossible for teams to spoof a
submission for a different team: the server `calls back' the team the
submitter identified himself as and checks for existence of the
advertised file. Because filenames are randomised and invisible
(within the <CODE>$HOME/.domjudge</CODE> directory by default), it is also
impossible for someone to guess another team's filename and submit it
for them.</P>
<P>The figure below is a graphical representation of the flow of a
submission. Arrows with filled lines indicate the flow of the
submission file, while dot-dash lines indicate flow of metadata about
the submission. Each line where no protocol of data transfer is given,
are just file system operations. Squares are programs and rounded
squares are storage locations.</P>
<P>
<FIGURE>
<EPS FILE="submitflow.eps">
<IMG SRC="submitflow.png">
<CAPTION>Submission flow diagram including Dolstra protocol.</CAPTION>
</FIGURE>
</P>

<P>To have DOMjudge configure the IP upon first submission in this way,
set option <CODE>STRICTIPCHECK</CODE> to 0. In that case, we start out without
IP's (and the web interface will not be accessible), but as soon as a
team connects with the command line submit client <EM>to the
submitdaemon</EM>, they are authenticated by correctly submitting a
file and the IP is registered and everything works as normal.</P>
<P>The connect can happen during the test session, so during the real
contest everything is fully available. This is a secure way of
authenticating teams, which requires no passwords or IP configuration,
but teams must submit via the command line submit client to the
command line daemon before they can access their teampage.</P>

<H2><A NAME="ss10.1">10.1</A> <A HREF="admin-manual.html#toc10.1">Dolstra protocol requirements</A>
</H2>


<P>If you want to use the Dolstra submit method (next to / instead of
the HTTP functionality) you need to satisfy the following requirements.</P>
<P>The submitdaemon needs to run at the domserver, and receive connections
on a configurable TCP port, default 9147.</P>
<P>Team accounts need to be
accessible via SSH on the jury computers (a SSH public key
of the jury account should be installed on all team accounts to
provide key-based access), and a shared filesystem (e.g. NFS)
is needed between the team computers and the domserver.
Alternatively, another means of
providing access from the server can be configured, see the file
<CODE>submit/submit_copy.sh</CODE> for more details.</P>
<P>To build the command line client under Windows, you need to have at least Windows XP and
cygwin version 1.7 for support of the complete <CODE>netdb.h</CODE>
headers.</P>


<HR>
Next
<A HREF="admin-manual-9.html">Previous</A>
<A HREF="admin-manual.html#toc10">Contents</A>
</BODY>
</HTML>
